#pragma once
#include "GeometryUtils.h"
#include "World.h"
#include "WorldInfoController.h"

class Ground;
class GameController;
class WorldInfoController;
class Human;
class Model3D;

class Validator
  {
  public:
    HSMODEL_API bool CanObjectBePlacedHere(const TVector3& i_point, const World& i_world, const GameController &i_control, EWorldEntityTypes i_type) const;
    HSMODEL_API bool CanChangeTerrain(const Model3D& i_changing_triangles, const WorldInfoController &i_wi_control) const;
    HSMODEL_API bool CanPlaceWater(const Model3D& i_water_part, const WorldInfoController& i_wi_control) const;
  private:  
    bool _IsPointAtWalkway(const TVector3& i_point, const Ground& i_ground) const;
    bool _IsPointAtGrass(const TVector3& i_point, const Ground& i_ground) const;
    bool _IsPointInGroundRange(const TVector3& i_point) const;
    bool _IsPointNearWalkway(const TVector3& i_point, const Ground& i_ground) const;
    bool _IsPointNearObject(const TVector3& i_point, const WorldInfoController& i_wi_control, EWorldEntityTypes i_object) const;
  };

